﻿<Window x:Class="WPF.DAAB.Client.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="XAML Development - Enterprise Library DAAB 5 y 6" Height="500" Width="900">

    <Window.Resources>
        <Style TargetType="Button">
            <Setter Property="Background" Value="#68217a"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Padding" Value="27"/>
            <Setter Property="FontSize" Value="27"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="Height" Value="100"/>
            <Setter Property="Width" Value="100"/>
            <Setter Property="Margin" Value="22,0"/>
        </Style>
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <StackPanel>
            <TextBlock Text="XAML Development - xamldevelopment.blogspot.com" FontSize="26" FontFamily="Segoe UI Light" FontStyle="Italic" Margin="22,22,0,0"/>
            <TextBlock Text="Enterprise Library Data Access Application Block 5, 6" FontSize="14" FontFamily="Segoe UI Light" FontStyle="Italic" Margin="22,3,0,0"/>
        </StackPanel>

        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <TextBlock x:Name="txtCantidadPersonas" VerticalAlignment="Center" HorizontalAlignment="Center" Text="0" FontFamily="Segoe UI Light" FontSize="22"/>
            <ComboBox x:Name="cboLista" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" DisplayMemberPath="Nombre" SelectedValuePath="ID" FontSize="22" SelectedIndex="0"/>
            <Grid x:Name="spPersona" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
                <StackPanel>
                    <TextBlock Text="Segundo nombre: " FontSize="22"/>
                    <TextBlock Text="{Binding SegundoNombre}" FontSize="22"/>
                    <TextBlock Text="Apellido: " FontSize="22"/>
                    <TextBox Text="{Binding Apellido, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="22"/>
                </StackPanel>
            </Grid>
        </Grid>
        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,27">
            <Button x:Name="btnContar" Content="1" Click="btnContar_Click"/>
            <Button x:Name="btnListar" Content="2" Click="btnListar_Click"/>
            <Button x:Name="btnLeer" Content="3" Click="btnLeer_Click"/>
            <Button x:Name="btnActualizar" Content="4" Click="btnActualizar_Click"/>
        </StackPanel>
    </Grid>
</Window>
